<template>
	<view class="body__group">
		<!-- <view class="tip__item">
			持续更新中...
		</view> -->
		<template v-for="(test,index) in collections">
			<navigator :url="`/pages/dati_3/dati_3?qids=${test.questionids}&cname=${test.name}`" :key="index">
				<globalCard>
					<view>{{test.name}}</view>
					<image class="lianxi-btn__item" src="../../../static/lianxi.png"></image>
					<view class="tip_1_item">我要练习</view>
				</globalCard>
			</navigator>
		</template>

	</view>
</template>

<script>
	export default {
		filters: {
			testLength(str) {
				const arr = str.slice(',');
				return arr.length
			}
		},
		data() {
			return {
				collections: []
			}
		},
		created() {
			uni.showLoading({
					title: '加载中...',
					mask: true
				})
			this.getcollections();
		},
		methods: {
			async getcollections() {
				const [err, result] = await this.$https({
					url: '/wechat/getcollections',
					method: 'GET',
				})
				uni.hideLoading()
				console.log(result)
				this.collections = result.data.data;
			}
		}
	}
</script>

<style lang="scss">
	.body__group {
		min-height: 100vh;
		padding: 20px;
		background-color: #F1F1F1;
		position: relative;
	}

	// 	.lianxi-btn__item {
	// 	width: 25vw;
	// 	height: calc(25vw / (192 / 54));
	// 	position: absolute;
	// 	right: 20px;
	// 	bottom: 20px;
	// }

	.tip__item {
		position: fixed;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		font-size: 12px;
		color: #aaa;
	}

</style>
